package com.rqbl.service.impl;

import com.rqbl.mapper.CommentLikeMapper;
import com.rqbl.service.CommentLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class CommentLikeServiceImpl implements CommentLikeService{

    @Autowired
    private CommentLikeMapper commentLikeMapper;

    @Override
    public Integer selectCommentLikeByUCId(Integer uid, Integer cid) {
        return commentLikeMapper.selectCommentLikeByUCId(uid, cid) == null ? 0 : 1;
    }

    @Override
    public Integer insertCommentLike(Integer uid, Integer cid) {
        return commentLikeMapper.insertCommentLike(uid, cid);
    }

    @Override
    public Integer deleteCommentLike(Integer uid, Integer cid) {
        return commentLikeMapper.deleteCommentLike(uid, cid);
    }
}
